<template>
  <div >
    <!-- <img v-for="item in arr" :key="item.id" :src="$pre+item.img" alt=""> -->
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" >
      <van-swipe-item v-for="item in arr" :key="item.id">
        <img :src="$pre + item.img" alt="">
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import { reqhomebanner } from "../../../http/http";
export default {
  data() {
    return {
      arr: [],
    };
  },
  created() {},
  mounted() {
    reqhomebanner().then((res) => {
      // console.log(res);
      this.arr = res.data.list;
    });
  },
  methods: {},
};
</script>

<style scoped>
.my-swipe{
    height: 3.8rem;
}
img {
  width: 100%;
  height: 100%;
}
</style>
